同时读取两个USB摄像头采集 您所在的位置:网站首页 Macbook Python调用摄像头 同时读取两个USB摄像头采集

同时读取两个USB摄像头采集

2023-06-12 22:06| 来源: 网络整理| 查看: 265

1.  OpenCV:VideoCapture同时打开两个摄像头 #include #include using namespace cv; using namespace std; int main() { //initialize and allocate memory to load the video stream from camera VideoCapture camera0(1); camera0.set(CAP_PROP_FRAME_WIDTH,320); camera0.set(CAP_PROP_FRAME_HEIGHT,240); VideoCapture camera1(0); camera1.set(CAP_PROP_FRAME_WIDTH,320); camera1.set(CAP_PROP_FRAME_HEIGHT,240); if( !camera0.isOpened() ) return 1; if( !camera1.isOpened() ) return 1; while(true) { //grab and retrieve each frames of the video sequentially Mat3b frame0; camera0 >> frame0; Mat3b frame1; camera1 >> frame1; imshow("Video0", frame0); imshow("Video1", frame1); //std::cout


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有